package
{
	import demo1.DemoScene_1;

	import demo2.DemoScene_2;

	import demo3.DemoScene_3;

	import flash.display.DisplayObject;
	import flash.display.Loader;
	import flash.display.MovieClip;
	import flash.display.Shader;
	import flash.display.Shape;
	import flash.display.Sprite;
	import flash.events.Event;
	import flash.filesystem.File;
	import flash.net.URLRequest;
	import flash.system.ApplicationDomain;

	[SWF(width="640", height="500", frameRate="60")]
	public class Main extends Sprite
	{
		private var guiSwfLoader:Loader;
		private var guiDomain:ApplicationDomain;

		public function Main()
		{
			guiSwfLoader=new Loader();
			guiSwfLoader.load(new URLRequest("GUI.swf"));
			guiSwfLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadGUIFileComplate);
		}

		private function onLoadGUIFileComplate(e:Event):void
		{
			ResUtils.guiDomain=e.currentTarget.applicationDomain;
			initialize();
		}

		private function initialize():void
		{
			this.addChild(new DemoScene_3());
		}
	}
}
